package org.argus.management.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.argus.management.domain.Domain;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_domain(业务领域表)】的数据库操作Mapper
* @createDate 2024-04-25 19:32:32
* @Entity org.argus.management.domain.Domain
*/
public interface DomainMapper extends BaseMapper<Domain> {

    /**
     * 获取用户最先绑定的业务域
     * @param username
     * @return
     */
    String getFirstAttachedDomain(@Param("username")String username);

    List<Domain> getUserDomains(@Param("userId") Long userId);

    List<Domain> getAllDomains();

    int getDuplicateCount(@Param("domain") Domain domain);

    void logicDelete(@Param("id") Long id);
}




